/*
 * @Description: 工程策划表汇总接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2022-03-22 15:12:31
 * @LastEditTime: 2022-03-25 18:10:31
 * @FilePath: \cscec-pms-admin\src\api\project\plannManagement\plannTableSummary.js
 */
import request from '@/utils/request2'
import { planProducer } from '@/api/config'
const api = {
  list: {
    getPageSchemeBySearch: planProducer + '/scheme/getPageSchemeBySearch',
  },
  view: {
    querySchemeSummaryDetail: planProducer + '/scheme/querySchemeSummaryDetail',
    querySchemeVersionList: planProducer + '/schemeVersion/querySchemeVersionList',
    submitScheme: planProducer + '/scheme/submitScheme',
  },
  scheme: {
    querySchemeTemporaryFacilitiesLedgerDetail: planProducer + '/schemeTemporaryFacilitiesLedger/querySchemeTemporaryFacilitiesLedgerDetail',
    batchUpdateSchemeTemporaryFacilitiesLedger: planProducer + '/schemeTemporaryFacilitiesLedger/batchUpdateSchemeTemporaryFacilitiesLedger',

    querySchemeSectionAcceptancePlanDetail: planProducer + '/schemeSectionAcceptancePlan/querySchemeSectionAcceptancePlanDetail',
    batchUpdateSchemeSectionAcceptancePlan: planProducer + '/schemeSectionAcceptancePlan/batchUpdateSchemeSectionAcceptancePlan',


    querySchemeMainResourceDetail: planProducer + '/schemeMainResource/querySchemeMainResourceDetail',
    batchUpdateSchemeMainResource: planProducer + '/schemeMainResource/batchUpdateSchemeMainResource',

    querySchemeSubcontractApproachPlanDetail: planProducer + '/schemeSubcontractApproachPlan/querySchemeSubcontractApproachPlanDetail',
    batchUpdateSchemeSubcontractApproachPlan: planProducer + '/schemeSubcontractApproachPlan/batchUpdateSchemeSubcontractApproachPlan'
  }
}
// 列表接口
const list = {
  /**
   * @description: 获取工程策划表列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getPageSchemeBySearch: data => {
    return request({
      url: api.list.getPageSchemeBySearch,
      method: 'post',
      data
    })
  }
}
// 详情接口
const view = {
  /**
   * @description: 获取工程策划表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  querySchemeSummaryDetail: data => {
    return request({
      url: `${api.view.querySchemeSummaryDetail}/${data}`,
      method: 'get',
      data
    })
  },
  /**
   * @description: 获取版本信息
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  querySchemeVersionList: data => {
    return request({
      url: api.view.querySchemeVersionList,
      method: 'post',
      data
    })
  },
  /**
   * @description: 修改工程策划表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  submitScheme: data => {
    return request({
      url: api.view.submitScheme,
      method: 'post',
      data
    })
  }
}
// 策划
const scheme = {
  /**
   * @description: 获取临建设施台账详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  querySchemeTemporaryFacilitiesLedgerDetail: data => {
    return request({
      url: api.scheme.querySchemeTemporaryFacilitiesLedgerDetail,
      method: 'post',
      data
    })
  },
  /**
   * @description: 修改临建设施台账
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  batchUpdateSchemeTemporaryFacilitiesLedger: data => {
    return request({
      url: api.scheme.batchUpdateSchemeTemporaryFacilitiesLedger,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取分段验收计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  querySchemeSectionAcceptancePlanDetail: data => {
    return request({
      url: api.scheme.querySchemeSectionAcceptancePlanDetail,
      method: 'post',
      data
    })
  },
  /**
   * @description: 修改分段验收计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  batchUpdateSchemeSectionAcceptancePlan: data => {
    return request({
      url: api.scheme.batchUpdateSchemeSectionAcceptancePlan,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取主要资源配置需求
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  querySchemeMainResourceDetail: data => {
    return request({
      url: api.scheme.querySchemeMainResourceDetail,
      method: 'post',
      data
    })
  },
  /**
   * @description: 修改主要资源配置需求
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  batchUpdateSchemeMainResource: data => {
    return request({
      url: api.scheme.batchUpdateSchemeMainResource,
      method: 'post',
      data
    })
  },

  /**
   * @description: 获取查询分包进场计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  querySchemeSubcontractApproachPlanDetail: data => {
    return request({
      url: api.scheme.querySchemeSubcontractApproachPlanDetail,
      method: 'post',
      data
    })
  },
  /**
   * @description: 修改查询分包进场计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  batchUpdateSchemeSubcontractApproachPlan: data => {
    return request({
      url: api.scheme.batchUpdateSchemeSubcontractApproachPlan,
      method: 'post',
      data
    })
  }

}
export {
  list,
  view,
  scheme
}
